function randomXToY(minVal,maxVal,floatVal)
{
  var randVal = minVal+(Math.random()*(maxVal-minVal));
  return typeof floatVal=='undefined'?Math.round(randVal):randVal.toFixed(floatVal);
}

function likeThis(idLike)
{
  likeLabel = document.getElementById(idLike);
  statLike = document.getElementById("stat"+idLike);
  if(statLike.innerHTML=="")
  {
	  if(!isNaN(parseInt(likeLabel.innerHTML)))
	  {
		likeLabel.innerHTML = ""+(parseInt(likeLabel.innerHTML,10)+1); 
		statLike.innerHTML = "_";
		statLike.style.color = "#FC9";
		likeLabel.style.color = "#090";
		return true;
	  }
	  else
	  {
		var matches = likeLabel.innerHTML.match(/script>(-{0,1}[0-9]+)/);  
		likeLabel.innerHTML = ""+(parseInt(matches[1],10)+1);
		statLike.innerHTML = "_";
		statLike.style.color = "#FC9";
		likeLabel.style.color = "#090";		
		return true;		
	  }        
  }
  else if(statLike.innerHTML=="."){
	  if(!isNaN(parseInt(likeLabel.innerHTML)))
	  {
		likeLabel.innerHTML = ""+(parseInt(likeLabel.innerHTML,10)+1);  
		statLike.innerHTML = " ";
		statLike.style.color = "#FC9";
		likeLabel.style.color = "#C00";
		return true;
	  }
	  else
	  {
		var matches = likeLabel.innerHTML.match(/script>(-{0,1}[0-9]+)/);  
		likeLabel.innerHTML = ""+(parseInt(matches[1],10)+1);
		statLike.innerHTML = " ";
		statLike.style.color = "#FC9";
		likeLabel.style.color = "#C00";
		return true;		
	  }          
  }
  		return false;
}

function dislikeThis(idLike)
{
  likeLabel = document.getElementById(idLike);
  statLike = document.getElementById("stat"+idLike);  
  if(statLike.innerHTML==" ")
  {
	  if(!isNaN(parseInt(likeLabel.innerHTML)))
	  {
		likeLabel.innerHTML = ""+(parseInt(likeLabel.innerHTML,10)-1);
		statLike.innerHTML = ".";
		statLike.style.color = "#FC9";
		likeLabel.style.color = "#C00";
		return true;		
	  }
	  else
	  {
		var matches = likeLabel.innerHTML.match(/script>(-{0,1}[0-9]+)/);  
		likeLabel.innerHTML = ""+(parseInt(matches[1],10)-1);  
		statLike.innerHTML = ".";
		statLike.style.color = "#FC9";
		likeLabel.style.color = "#C00";
		return true;				
	  }        
  }  
  else if(statLike.innerHTML=="_"){
	  if(!isNaN(parseInt(likeLabel.innerHTML)))
	  {
		likeLabel.innerHTML = ""+(parseInt(likeLabel.innerHTML,10)-1);
		statLike.innerHTML = " ";
		statLike.style.color = "#FC9";
		likeLabel.style.color = "#090";
		return true;		
	  }
	  else
	  {
		var matches = likeLabel.innerHTML.match(/script>(-{0,1}[0-9]+)/);  
		likeLabel.innerHTML = ""+(parseInt(matches[1],10)-1);  
		statLike.innerHTML = " ";
		statLike.style.color = "#FC9";
		likeLabel.style.color = "#090";
		return true;				
	  }          
  }
  return false;
}